package com.ruoyi.web.pgci.mapper;

import com.ruoyi.web.pgci.domain.PgciSailorsCourseLearnRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yyq
 * @create 2023-11-12
 * @description
 */
public interface PgciSailorsCourseLearnRecordMapper {

    /**
     * 查询船员课程学习记录
     *
     * @param id 船员课程学习记录主键
     * @return 船员课程学习记录
     */
    public PgciSailorsCourseLearnRecord selectPgciSailorsCourseLearnRecordById(Long id);

    /**
     * 查询船员课程学习记录列表
     *
     * @param pgciSailorsCourseLearnRecord 船员课程学习记录
     * @return 船员课程学习记录集合
     */
    public List<PgciSailorsCourseLearnRecord> selectPgciSailorsCourseLearnRecordList(PgciSailorsCourseLearnRecord pgciSailorsCourseLearnRecord);

    public PgciSailorsCourseLearnRecord selectLastCourseLearnRecordListByUserIdAndCourseId(PgciSailorsCourseLearnRecord learnRecord);
    /**
     * 新增船员课程学习记录
     *
     * @param pgciSailorsCourseLearnRecord 船员课程学习记录
     * @return 结果
     */
    public int insertPgciSailorsCourseLearnRecord(PgciSailorsCourseLearnRecord pgciSailorsCourseLearnRecord);

    public int  batchInsertPgciSailorsCourseLearnRecord(List<PgciSailorsCourseLearnRecord> list);
    /**
     * 修改船员课程学习记录
     *
     * @param pgciSailorsCourseLearnRecord 船员课程学习记录
     * @return 结果
     */
    public int updatePgciSailorsCourseLearnRecord(PgciSailorsCourseLearnRecord pgciSailorsCourseLearnRecord);

    /**
     * 删除船员课程学习记录
     *
     * @param id 船员课程学习记录主键
     * @return 结果
     */
    public int deletePgciSailorsCourseLearnRecordById(Long id);

    /**
     * 批量删除船员课程学习记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePgciSailorsCourseLearnRecordByIds(Long[] ids);

    long selectSailorsCourseLearnCountBySaIdAndCourseIds(@Param("userId") String userId,@Param("courseIdList") List<Long> courseIdList);
}
